<html>
<head><meta charset="utf-8"><title>trait func completion does not fill in generics · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html">trait func completion does not fill in generics</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242932244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242932244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242932244">(Jun 16 2021 at 19:41)</a>:</h4>
<p>Hello! </p>
<p>One particular problem in RA bugs me a bit, when a trait fn is autocompleted (like mul in Mul), it will not fill in the generics in the signature with the ones you have, so if you do <code>impl Mul&lt;usize&gt;</code>, it will not give you <code>fn mul(self, rhs: usize) -&gt; ...</code>, it will give you <code>fn mul(self, rhs: Rhs) -&gt; ...</code>. This is kind of annoying because you need to go back and fill it in. Is this issue already recorded as an issue or fixed in a PR? id be wiling to submit a PR to fix this (with maybe some help in finding where the completion is done :) ).</p>



<a name="242934476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242934476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242934476">(Jun 16 2021 at 19:58)</a>:</h4>
<p>I don't think we have an issue tracking that yet, the completion for trait items lives in <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs</a></p>



<a name="242935081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935081">(Jun 16 2021 at 20:02)</a>:</h4>
<p>Here to be precise is where the function is built <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs#L127-L165">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs#L127-L165</a></p>



<a name="242935092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935092">(Jun 16 2021 at 20:02)</a>:</h4>
<p>Awesome</p>



<a name="242935110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935110">(Jun 16 2021 at 20:02)</a>:</h4>
<p>Ill file an issue later and see if i can fix it myself</p>



<a name="242935152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935152">(Jun 16 2021 at 20:03)</a>:</h4>
<p>im not sure if copy and pasting the generic from the impl sig to the right place is enough haha</p>



<a name="242935189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935189">(Jun 16 2021 at 20:03)</a>:</h4>
<p>I cant think of any examples where that wouldnt work</p>



<a name="242935204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935204">(Jun 16 2021 at 20:03)</a>:</h4>
<p>Feel free to ask here if you got trouble with it/if somethings unclear</p>



<a name="242935314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935314">(Jun 16 2021 at 20:04)</a>:</h4>
<p>Ye taking the generic from the trait in the impl header seems to be a good idea</p>



<a name="242935797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242935797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242935797">(Jun 16 2021 at 20:08)</a>:</h4>
<p>Alright ill try that first then see if anyone has alternate ideas</p>



<a name="242958235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242958235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242958235">(Jun 16 2021 at 23:56)</a>:</h4>
<p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span> how would i go about replacing the types in the function? from what i know, this is cached in a salsa db, so is there some way to get an owned struct or something? kind of confused on how to go about this <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="242958795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242958795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242958795">(Jun 17 2021 at 00:02)</a>:</h4>
<p>You dont need to replace anything, you only have to change the source creation in ehre <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs#L153-L160">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide_completion/src/completions/trait_impl.rs#L153-L160</a></p>



<a name="242958889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242958889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242958889">(Jun 17 2021 at 00:04)</a>:</h4>
<p>so instead of modifying it in place i just add more edits to replace the types in the string?</p>



<a name="242958967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242958967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242958967">(Jun 17 2021 at 00:05)</a>:</h4>
<p>im not sure if doing it on the type level or the source/ast level is easier</p>



<a name="242958990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242958990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242958990">(Jun 17 2021 at 00:05)</a>:</h4>
<p>Oh I msorry I misunderstood the code here</p>



<a name="242959057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959057">(Jun 17 2021 at 00:06)</a>:</h4>
<p>Right you wanna <code>clone_for_update()</code> the function syntax node and then rewrite it you were right with that</p>



<a name="242959064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959064">(Jun 17 2021 at 00:06)</a>:</h4>
<p>cause from what i understand about RA's architecture, everything is either refcounted or its housed in a db, which makes getting owned stuff kinda rough :/</p>



<a name="242959083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959083">(Jun 17 2021 at 00:07)</a>:</h4>
<p>wouldnt working on the syntax node level be harder because the type info isnt there?</p>



<a name="242959084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959084">(Jun 17 2021 at 00:07)</a>:</h4>
<p>Ye so for syntax trees we have that <code>clone_for_update</code> function which basically makes a mutable clone of it that you can rewrite</p>



<a name="242959094"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959094" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959094">(Jun 17 2021 at 00:07)</a>:</h4>
<p>i see</p>



<a name="242959107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959107">(Jun 17 2021 at 00:07)</a>:</h4>
<p>so i need to identify what to replace in another pass, then rewrite the syntax nodes based on that, right?</p>



<a name="242959108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959108">(Jun 17 2021 at 00:07)</a>:</h4>
<p>well all you really need is to copy the generic param node out of the impl/trait header and copy it into the function node's param type</p>



<a name="242959111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959111">(Jun 17 2021 at 00:07)</a>:</h4>
<p>then you can just render that</p>



<a name="242959119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959119">(Jun 17 2021 at 00:07)</a>:</h4>
<p>if I see this right</p>



<a name="242959125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959125">(Jun 17 2021 at 00:07)</a>:</h4>
<p>right but i need to check what types include generics</p>



<a name="242959156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959156">(Jun 17 2021 at 00:08)</a>:</h4>
<p>which might also be recursive</p>



<a name="242959178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959178">(Jun 17 2021 at 00:08)</a>:</h4>
<p>such as <code>Vec&lt;T&gt;</code>as a param instead of just <code>T</code></p>



<a name="242959199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959199">(Jun 17 2021 at 00:08)</a>:</h4>
<p>But <code>T</code> should already be in scope in that case so it doesnt matter just grabbing it should be fine</p>



<a name="242959200"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959200" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959200">(Jun 17 2021 at 00:08)</a>:</h4>
<p>(deleted)</p>



<a name="242959214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959214">(Jun 17 2021 at 00:09)</a>:</h4>
<p>(deleted)</p>



<a name="242959219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959219">(Jun 17 2021 at 00:09)</a>:</h4>
<p>is there an easy way to pull the references to it inside that specific function?</p>



<a name="242959236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959236">(Jun 17 2021 at 00:09)</a>:</h4>
<p>what references do you mean</p>



<a name="242959247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959247">(Jun 17 2021 at 00:09)</a>:</h4>
<p>pulling all the references to each generic declared in the impl</p>



<a name="242959307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959307">(Jun 17 2021 at 00:10)</a>:</h4>
<p>like if the function takes <code>T</code> as a param, pulling that reference from the declared <code>T</code> in the impl</p>



<a name="242959484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959484">(Jun 17 2021 at 00:13)</a>:</h4>
<p>not even quite sure how to get the actual impl <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="242959491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959491">(Jun 17 2021 at 00:13)</a>:</h4>
<p>Mmh ye I just realized its not that simple as I was hoping</p>



<a name="242959494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959494">(Jun 17 2021 at 00:13)</a>:</h4>
<p>But</p>



<a name="242959534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959534">(Jun 17 2021 at 00:14)</a>:</h4>
<p>we have an assist that does something similar I just realized</p>



<a name="242959538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959538">(Jun 17 2021 at 00:14)</a>:</h4>
<p>so I think you can take inspiration from that</p>



<a name="242959542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959542">(Jun 17 2021 at 00:14)</a>:</h4>
<p>ooh</p>



<a name="242959543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959543">(Jun 17 2021 at 00:14)</a>:</h4>
<p><code>add_missing_impl_members</code></p>



<a name="242959549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959549">(Jun 17 2021 at 00:14)</a>:</h4>
<p>The <code>fill_in_type_params_1</code> and <code>fill_in_type_params_2</code> tests seems to do pretty similar things</p>



<a name="242959558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959558">(Jun 17 2021 at 00:14)</a>:</h4>
<p>where is that assist?</p>



<a name="242959563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959563">(Jun 17 2021 at 00:14)</a>:</h4>
<p>So I think you should be able to copy whatever its doing there</p>



<a name="242959567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959567">(Jun 17 2021 at 00:15)</a>:</h4>
<p>nvm found it</p>



<a name="242959574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959574">(Jun 17 2021 at 00:15)</a>:</h4>
<p><code>crates\ide_assists\src\handlers\add_missing_impl_members.rs</code></p>



<a name="242959678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959678">(Jun 17 2021 at 00:16)</a>:</h4>
<p>hmmm cant quite tell how its doing it</p>



<a name="242959821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242959821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242959821">(Jun 17 2021 at 00:19)</a>:</h4>
<p>it seems to defer to <code>add_trait_assoc_items_to_impl</code>, but it doesnt seem to do anything for that, and it doesnt seem to be done before that</p>



<a name="242960129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960129">(Jun 17 2021 at 00:24)</a>:</h4>
<p>The assist first fetches all missing assoc items, which in your case here would be the function we want to complete, then <code>add_trait_assoc_items_to_impl</code> takes those and adds them to the passed impl and returns a new impl. Then the assist replaces the old impl block with the new one</p>



<a name="242960132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960132">(Jun 17 2021 at 00:24)</a>:</h4>
<p>it calls <code>get_missing_assoc_items</code> to get the items, but that function seems to do nothing for that</p>



<a name="242960134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960134">(Jun 17 2021 at 00:24)</a>:</h4>
<p>The replacement we dont wanna do here of course</p>



<a name="242960157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960157">(Jun 17 2021 at 00:25)</a>:</h4>
<p>hows that function substituting the generics however?</p>



<a name="242960221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960221">(Jun 17 2021 at 00:26)</a>:</h4>
<p>Substitution happens inside <code>add_trait_assoc_items_to_impl</code> via the <code>PathTransform</code> object in there</p>



<a name="242960242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960242">(Jun 17 2021 at 00:26)</a>:</h4>
<p>ah hmmm</p>



<a name="242960259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960259">(Jun 17 2021 at 00:26)</a>:</h4>
<p>ohh i see</p>



<a name="242960262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960262">(Jun 17 2021 at 00:26)</a>:</h4>
<p>yeah thats kind of obscure but i can prob just use that</p>



<a name="242960269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960269">(Jun 17 2021 at 00:26)</a>:</h4>
<p>So thats the component you certainly want to reuse</p>



<a name="242960278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960278">(Jun 17 2021 at 00:26)</a>:</h4>
<p>can i access that from ide_completion?</p>



<a name="242960281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960281">(Jun 17 2021 at 00:27)</a>:</h4>
<p>cause its a separate crate</p>



<a name="242960301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960301">(Jun 17 2021 at 00:27)</a>:</h4>
<p>Nope you will have to move that to <code>ide_db</code> most likely</p>



<a name="242960312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960312">(Jun 17 2021 at 00:27)</a>:</h4>
<p>whew, thats going to be some work</p>



<a name="242960386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960386">(Jun 17 2021 at 00:28)</a>:</h4>
<p>where would you suggest i put it? just in <a href="http://assists.rs">assists.rs</a>?</p>



<a name="242960404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960404">(Jun 17 2021 at 00:28)</a>:</h4>
<p>actually, i can prob just copy over <a href="http://path_transform.rs">path_transform.rs</a></p>



<a name="242960428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960428">(Jun 17 2021 at 00:29)</a>:</h4>
<p>I would just move the <code>ide_assists/src/path_transform.rs</code> to <code>ide_db/src/path_transform.rs</code> for now</p>



<a name="242960431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960431">(Jun 17 2021 at 00:29)</a>:</h4>
<p>ye</p>



<a name="242960432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960432">(Jun 17 2021 at 00:29)</a>:</h4>
<p>yeah thats what i did</p>



<a name="242960510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960510">(Jun 17 2021 at 00:30)</a>:</h4>
<p>getting a lot of unresolved imports for things like ide_db, is that normal?</p>



<a name="242960513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960513">(Jun 17 2021 at 00:30)</a>:</h4>
<p>from RA, it compiles fine though</p>



<a name="242960539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960539">(Jun 17 2021 at 00:31)</a>:</h4>
<p>you mean rustc is complaining?</p>



<a name="242960542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960542">(Jun 17 2021 at 00:31)</a>:</h4>
<p>oh</p>



<a name="242960543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960543">(Jun 17 2021 at 00:31)</a>:</h4>
<p>nvm</p>



<a name="242960558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960558">(Jun 17 2021 at 00:31)</a>:</h4>
<p>I imagine its related to the Databases?</p>



<a name="242960564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960564">(Jun 17 2021 at 00:31)</a>:</h4>
<p>yeah it seems to be</p>



<a name="242960573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960573">(Jun 17 2021 at 00:31)</a>:</h4>
<p>oh think i found it</p>



<a name="242960577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960577">(Jun 17 2021 at 00:31)</a>:</h4>
<p>Your proc-macro server might have crashed if you are on a recent nightly</p>



<a name="242960579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960579">(Jun 17 2021 at 00:31)</a>:</h4>
<p><code>proc macro server crashed</code>, i forgot i enabled the proc macro experimental thing some time ago lol</p>



<a name="242960585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960585">(Jun 17 2021 at 00:31)</a>:</h4>
<p>or is that not related to that?</p>



<a name="242960627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960627">(Jun 17 2021 at 00:32)</a>:</h4>
<p>yeah im on the latest nightly, i could switch to stable though</p>



<a name="242960630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960630">(Jun 17 2021 at 00:32)</a>:</h4>
<p>ye if crashes with the experimental feature turned on all items with attributes disappear to RA</p>



<a name="242960644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960644">(Jun 17 2021 at 00:32)</a>:</h4>
<p>well either switch to stable or turn off the experimental feature</p>



<a name="242960673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960673">(Jun 17 2021 at 00:33)</a>:</h4>
<p>what should the scopes in the path transform be in this case?</p>



<a name="242960702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960702">(Jun 17 2021 at 00:33)</a>:</h4>
<p>uuh</p>



<a name="242960790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960790">(Jun 17 2021 at 00:35)</a>:</h4>
<p>the assist seems to use the impl def as the target and ctx.sema's scope for the source</p>



<a name="242960816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960816">(Jun 17 2021 at 00:35)</a>:</h4>
<p>im not sure what ctx.sema is in this case, im guessing prob just the scope inside the impl block?</p>



<a name="242960830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960830">(Jun 17 2021 at 00:35)</a>:</h4>
<p>sema = Semantics, is just something that binds syntax to the hir in a sense</p>



<a name="242960878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960878">(Jun 17 2021 at 00:36)</a>:</h4>
<p>so you wanna use the same scopes here</p>



<a name="242960881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960881">(Jun 17 2021 at 00:36)</a>:</h4>
<p>that is</p>



<a name="242960886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960886">(Jun 17 2021 at 00:36)</a>:</h4>
<p>alright</p>



<a name="242960888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960888">(Jun 17 2021 at 00:36)</a>:</h4>
<p>get the scope for the trait def as source</p>



<a name="242960900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960900">(Jun 17 2021 at 00:36)</a>:</h4>
<p>and the scope of the impl for the target</p>



<a name="242960921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960921">(Jun 17 2021 at 00:36)</a>:</h4>
<p>to get the impl def the assist's approach of <code>ctx.find_node_at_offset::&lt;ast::Impl&gt;()?</code> should also work, or is this in a different context?</p>



<a name="242960938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960938">(Jun 17 2021 at 00:37)</a>:</h4>
<p>You already have the <code>Impl</code> node in the completion</p>



<a name="242960945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960945">(Jun 17 2021 at 00:37)</a>:</h4>
<p>oh i do? haha i must have missed it</p>



<a name="242960947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960947">(Jun 17 2021 at 00:37)</a>:</h4>
<p>the context there is different</p>



<a name="242960957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960957">(Jun 17 2021 at 00:37)</a>:</h4>
<p>Ye you will ahve to thread it through to your function call</p>



<a name="242960964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242960964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242960964">(Jun 17 2021 at 00:37)</a>:</h4>
<p>But it already exists in  the <code>complete_trait_impl</code> call</p>



<a name="242961011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961011">(Jun 17 2021 at 00:38)</a>:</h4>
<p>through the context?</p>



<a name="242961018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961018">(Jun 17 2021 at 00:38)</a>:</h4>
<p>nvm im blind</p>



<a name="242961057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961057">(Jun 17 2021 at 00:39)</a>:</h4>
<p>the tricky part is to get the trait def node of the impl which you will need the semantics for</p>



<a name="242961131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961131">(Jun 17 2021 at 00:41)</a>:</h4>
<p>so, to get the trait i need to go through <code>resolve_target_trait</code>, but that wants the sema, which is different in this case</p>



<a name="242961136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961136">(Jun 17 2021 at 00:41)</a>:</h4>
<p>Ah ye there is a function for this already sweet</p>



<a name="242961146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961146">(Jun 17 2021 at 00:41)</a>:</h4>
<p>so the contexts are different here because one is an AssistContext and the other a CompletionContext</p>



<a name="242961150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961150">(Jun 17 2021 at 00:41)</a>:</h4>
<p>both have a <code>Semantics</code> though</p>



<a name="242961151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961151">(Jun 17 2021 at 00:41)</a>:</h4>
<p>no problem there then</p>



<a name="242961153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961153">(Jun 17 2021 at 00:41)</a>:</h4>
<p>yeah, and i presume the assistcontext is "inside" the impl block?</p>



<a name="242961160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961160">(Jun 17 2021 at 00:41)</a>:</h4>
<p>oh but even if it is, the sema should be the same, nvm</p>



<a name="242961213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961213">(Jun 17 2021 at 00:42)</a>:</h4>
<p>no the contexts is not linked to the syntax nodes in anyway</p>



<a name="242961228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961228">(Jun 17 2021 at 00:42)</a>:</h4>
<p>oh it isnt? odd</p>



<a name="242961262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961262">(Jun 17 2021 at 00:42)</a>:</h4>
<p>well the AssistContext knows about the file and can look through it to find nodes, not linked in any way is a wrong term sorry</p>



<a name="242961269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961269">(Jun 17 2021 at 00:43)</a>:</h4>
<p>The completioncontext does some more analysis on the syntax</p>



<a name="242961287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961287">(Jun 17 2021 at 00:43)</a>:</h4>
<p>should i also call <code>remove_attrs_and_docs</code> like the assist does?</p>



<a name="242961347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242961347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242961347">(Jun 17 2021 at 00:44)</a>:</h4>
<p>nvm that was a stupid question</p>



<a name="242962292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242962292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242962292">(Jun 17 2021 at 01:00)</a>:</h4>
<p>for some reason its also failing to check because its trying to build <code>tikv-jemalloc-sys</code>, but im on msvc, and Cargo.toml says it shouldnt be built for msvc</p>



<a name="242962298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242962298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242962298">(Jun 17 2021 at 01:00)</a>:</h4>
<p>rustc builds it fine though</p>



<a name="242962477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242962477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242962477">(Jun 17 2021 at 01:03)</a>:</h4>
<p>That seems odd</p>



<a name="242962557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/242962557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#242962557">(Jun 17 2021 at 01:04)</a>:</h4>
<p><a href="/user_uploads/4715/5HrrjaBCDQplaySOiN_KodCe/Screenshot_228.png">Screenshot_228.png</a>  really weird</p>
<div class="message_inline_image"><a href="/user_uploads/4715/5HrrjaBCDQplaySOiN_KodCe/Screenshot_228.png" title="Screenshot_228.png"><img src="/user_uploads/4715/5HrrjaBCDQplaySOiN_KodCe/Screenshot_228.png"></a></div>



<a name="243061277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243061277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243061277">(Jun 17 2021 at 18:20)</a>:</h4>
<p>Yeah its really weird, even after deleting the jemalloc features, RA doesnt seem to identify errors when saving and running cargo check, but running cargo check manually shows them</p>



<a name="243061646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243061646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243061646">(Jun 17 2021 at 18:23)</a>:</h4>
<p>Have you tried <code>cargo clean</code> and then rebuilding yet?</p>



<a name="243061663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243061663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243061663">(Jun 17 2021 at 18:23)</a>:</h4>
<p>haha i was just about to say that fixed it</p>



<a name="243061708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243061708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243061708">(Jun 17 2021 at 18:23)</a>:</h4>
<p>although the tikv-jemalloc-sys issue still exists, i had to remove the feature manually</p>



<a name="243062055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062055">(Jun 17 2021 at 18:25)</a>:</h4>
<p>hmm thats quite odd honestly, im on windwos as well and for me everything builds fine</p>



<a name="243062142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062142">(Jun 17 2021 at 18:26)</a>:</h4>
<p>im on 1.53 btw</p>



<a name="243062172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062172">(Jun 17 2021 at 18:26)</a>:</h4>
<p>that should be fine</p>



<a name="243062174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062174">(Jun 17 2021 at 18:26)</a>:</h4>
<p>i dont have any exotic RA settings that might mess with it i dont think</p>



<a name="243062213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062213">(Jun 17 2021 at 18:27)</a>:</h4>
<p>lol nevermind i have all features active <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span></p>



<a name="243062219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062219">(Jun 17 2021 at 18:27)</a>:</h4>
<p>spoke too soon</p>



<a name="243062227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062227">(Jun 17 2021 at 18:27)</a>:</h4>
<p>well there we go</p>



<a name="243062234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062234">(Jun 17 2021 at 18:27)</a>:</h4>
<p><span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="243062267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062267">(Jun 17 2021 at 18:27)</a>:</h4>
<p>haha does cargo not have a way to not offer a feature for a target</p>



<a name="243062409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062409">(Jun 17 2021 at 18:28)</a>:</h4>
<p>huh but it should be disabled for this workspace as the settings say</p>



<a name="243062509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243062509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243062509">(Jun 17 2021 at 18:28)</a>:</h4>
<p>thats weird, turning it on and off fixed it, anyways it works haha</p>



<a name="243063344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063344">(Jun 17 2021 at 18:34)</a>:</h4>
<p>also, is there a way to easily transform the hir version of something to its ast version? other than going through the syntax node then to the ast node</p>



<a name="243063361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063361">(Jun 17 2021 at 18:34)</a>:</h4>
<p>like <code>hir::Impl</code> -&gt; <code>ast::Impl</code></p>



<a name="243063529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063529">(Jun 17 2021 at 18:35)</a>:</h4>
<p>ah nvm</p>



<a name="243063649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063649">(Jun 17 2021 at 18:36)</a>:</h4>
<p>there is a <code>source</code> function implemented on most hir things if needed</p>



<a name="243063657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063657">(Jun 17 2021 at 18:36)</a>:</h4>
<p><code>HasSource</code> being the trait i think</p>



<a name="243063729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063729">(Jun 17 2021 at 18:37)</a>:</h4>
<p>yeah i realized i can just go through source then value</p>



<a name="243063898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243063898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243063898">(Jun 17 2021 at 18:38)</a>:</h4>
<p>everything working off a big database is interesting, its nice because you can cheaply pass around stuff but also kind of weird because u need to go through the db to get anything meaningful</p>



<a name="243064113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064113">(Jun 17 2021 at 18:39)</a>:</h4>
<p>also a bit weird because theres things that modify structures but dont take mutable refs, because they modify it in the db, so its sometimes hard to deduce what is changing what</p>



<a name="243064281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064281">(Jun 17 2021 at 18:40)</a>:</h4>
<p>The stuff inside the Database is immutable as far as I know</p>



<a name="243064548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064548">(Jun 17 2021 at 18:42)</a>:</h4>
<p>when should i be using clone_for_update? im making an AssocItem from the value of an hir Function, then applying the transform to that, then the edit, but in other places, the edit calls clone_subtree then clone_for_update</p>



<a name="243064722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064722">(Jun 17 2021 at 18:43)</a>:</h4>
<p>Basically the syntax trees are immutable, <code>clone_for_update</code> gives you a separate copy that can be modified though. <code>clone_subtree</code> clones a tree discarding the mutability "flag" again which is used there so <code>clone_for_update</code> doesnt panic should the tree already be mutable</p>



<a name="243064748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064748">(Jun 17 2021 at 18:43)</a>:</h4>
<p>sorry for all the questions, im very familiar with the parser and syntax part of RA but ive never messed with higher level stuff <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="243064751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064751">(Jun 17 2021 at 18:43)</a>:</h4>
<p>so usually you wanna call clone_for_update on a tree if you want to mutate (a copy of) it</p>



<a name="243064886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064886">(Jun 17 2021 at 18:44)</a>:</h4>
<p>so i should be cloning for update here so i can modify it <code>let assoc_item = ast::AssocItem::Fn(func.source(ctx.db)?.value);</code></p>



<a name="243064918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243064918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243064918">(Jun 17 2021 at 18:45)</a>:</h4>
<p>yes</p>



<a name="243065036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065036">(Jun 17 2021 at 18:45)</a>:</h4>
<p>how come remove_attrs_and_docs doesnt seem to modify in place then <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="243065237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065237">(Jun 17 2021 at 18:47)</a>:</h4>
<p>It just hasnt been rewritten yet most likely. The inplace modification api is rather new</p>



<a name="243065299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065299">(Jun 17 2021 at 18:47)</a>:</h4>
<p>before you had to reconstruct a tree with your changes instead</p>



<a name="243065314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065314">(Jun 17 2021 at 18:47)</a>:</h4>
<p>oh is this the new rowan experiment i saw a while ago?</p>



<a name="243065329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065329">(Jun 17 2021 at 18:47)</a>:</h4>
<p>Yep</p>



<a name="243065336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065336">(Jun 17 2021 at 18:47)</a>:</h4>
<p>oh sweet</p>



<a name="243065338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065338">(Jun 17 2021 at 18:47)</a>:</h4>
<p>Immutable-mutable syntax trees</p>



<a name="243065425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065425">(Jun 17 2021 at 18:48)</a>:</h4>
<p>ive used rowan a ton for my own projects, thankfully i didnt really need tree mutation</p>



<a name="243065811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065811">(Jun 17 2021 at 18:51)</a>:</h4>
<p>hmm whats the opposite conversion method? ast -&gt; hir ?</p>



<a name="243065829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065829">(Jun 17 2021 at 18:51)</a>:</h4>
<p><code>sema.to_def</code></p>



<a name="243065837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243065837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243065837">(Jun 17 2021 at 18:51)</a>:</h4>
<p>thanks :)</p>



<a name="243067594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243067594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243067594">(Jun 17 2021 at 19:04)</a>:</h4>
<p>nice it seems to work</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="cp">#[test]</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">generics_are_inlined</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">check_edit</span><span class="p">(</span><span class="w"></span>
<span class="w">            </span><span class="s">"function"</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s">r#"</span>
<span class="s">trait Foo&lt;T&gt; {</span>
<span class="s">    fn function(bar: T);</span>
<span class="s">}</span>
<span class="s">struct Bar;</span>

<span class="s">impl Foo&lt;u32&gt; for Bar {</span>
<span class="s">    fn f$0</span>
<span class="s">}</span>
<span class="s">"#</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s">r#"</span>
<span class="s">trait Foo&lt;T&gt; {</span>
<span class="s">    fn function(bar: T);</span>
<span class="s">}</span>
<span class="s">struct Bar;</span>

<span class="s">impl Foo&lt;u32&gt; for Bar {</span>
<span class="s">    fn function(bar: u32) {</span>
<span class="s">    $0</span>
<span class="s">}</span>
<span class="s">}</span>
<span class="s">"#</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">)</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243068064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068064">(Jun 17 2021 at 19:07)</a>:</h4>
<p>just going to add some more tests and ill submit the PR</p>



<a name="243068145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068145">(Jun 17 2021 at 19:08)</a>:</h4>
<p>perfect <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="243068276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068276">(Jun 17 2021 at 19:09)</a>:</h4>
<p>are there any other special cases to test other than parameter inlining and return type inlining?</p>



<a name="243068553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068553">(Jun 17 2021 at 19:10)</a>:</h4>
<p>the type of associated consts</p>



<a name="243068563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068563">(Jun 17 2021 at 19:11)</a>:</h4>
<p>ohh yes</p>



<a name="243068619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068619">(Jun 17 2021 at 19:11)</a>:</h4>
<p>but aside from that i dont think so</p>



<a name="243068674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068674">(Jun 17 2021 at 19:11)</a>:</h4>
<p>or well technically the where clauses of functions could reference the generic parameters as well</p>



<a name="243068703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068703">(Jun 17 2021 at 19:11)</a>:</h4>
<p>so those have also be checked</p>



<a name="243068874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068874">(Jun 17 2021 at 19:12)</a>:</h4>
<p>oh think i found a bug, its not inlining multiple generics</p>



<a name="243068897"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068897" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068897">(Jun 17 2021 at 19:13)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">Left</span>:
<span class="nc">trait</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="p">,</span><span class="w"> </span><span class="n">V</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">function</span><span class="p">(</span><span class="n">bar</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">baz</span>: <span class="nc">U</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Arc</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">V</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">usize</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="kt">u8</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">function</span><span class="p">(</span><span class="n">bar</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="n">baz</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">usize</span><span class="o">&gt;&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Arc</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">u8</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="cp">$</span><span class="mi">0</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>


<span class="n">Right</span>:
<span class="nc">trait</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">U</span><span class="p">,</span><span class="w"> </span><span class="n">V</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">function</span><span class="p">(</span><span class="n">bar</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">baz</span>: <span class="nc">U</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Arc</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">V</span><span class="o">&gt;&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Bar</span><span class="p">;</span><span class="w"></span>

<span class="k">impl</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="kt">u32</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">function</span><span class="p">(</span><span class="n">bar</span>: <span class="nb">Vec</span><span class="o">&lt;</span><span class="kt">u32</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">baz</span>: <span class="nc">U</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Arc</span><span class="o">&lt;</span><span class="nb">Vec</span><span class="o">&lt;</span><span class="n">V</span><span class="o">&gt;&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="cp">$</span><span class="mi">0</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243068957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243068957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243068957">(Jun 17 2021 at 19:13)</a>:</h4>
<p>thats odd, the path transform should already be doing this</p>



<a name="243069135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243069135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243069135">(Jun 17 2021 at 19:14)</a>:</h4>
<p>oh wait i missed the other ones in the check lmao</p>



<a name="243069518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243069518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243069518">(Jun 17 2021 at 19:17)</a>:</h4>
<p>what does the <code>f$0</code> represent? the <code>f</code> specifically, is <code>$0</code> enough if i want to test the const/function name?</p>



<a name="243070581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243070581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243070581">(Jun 17 2021 at 19:24)</a>:</h4>
<p>The $0 is the cursor position in the test</p>



<a name="243070633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243070633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243070633">(Jun 17 2021 at 19:25)</a>:</h4>
<p>you probably need to put at least one character after the <code>fn</code> because completion might not work otherwise in that position</p>



<a name="243070662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243070662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243070662">(Jun 17 2021 at 19:25)</a>:</h4>
<p>as in <code>fn $0</code> might not trigger it</p>



<a name="243070693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243070693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243070693">(Jun 17 2021 at 19:25)</a>:</h4>
<p>so the <code>f</code> there is just a character</p>



<a name="243071117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243071117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243071117">(Jun 17 2021 at 19:28)</a>:</h4>
<p>ah i see</p>



<a name="243101224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243101224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243101224">(Jun 18 2021 at 00:05)</a>:</h4>
<p>hmm i just realized that PathTransform does not work on const generics</p>



<a name="243101593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243101593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243101593">(Jun 18 2021 at 00:09)</a>:</h4>
<p>submitted the pr <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span> <a href="https://github.com/rust-analyzer/rust-analyzer/pull/9321">https://github.com/rust-analyzer/rust-analyzer/pull/9321</a></p>



<a name="243102739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243102739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243102739">(Jun 18 2021 at 00:25)</a>:</h4>
<p>hmm CI is failing because of trailing whitespace, but im not sure what it's complaining about, running cargo fmt check locally doesnt trigger it</p>



<a name="243119690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243119690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243119690">(Jun 18 2021 at 06:03)</a>:</h4>
<p>Ugh. There's a space at the end of line 966 (do they start from 0?), but the test fails if you remove it.</p>



<a name="243119742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243119742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243119742">(Jun 18 2021 at 06:04)</a>:</h4>
<p>Try:</p>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git i/crates/ide_completion/src/completions/trait_impl.rs w/crates/ide_completion/src/completions/trait_impl.rs</span>
<span class="gh">index 1f6b959af..37622aaad 100644</span>
<span class="gd">--- i/crates/ide_completion/src/completions/trait_impl.rs</span>
<span class="gi">+++ w/crates/ide_completion/src/completions/trait_impl.rs</span>
<span class="gu">@@ -953,7 +953,7 @@ trait Foo&lt;T&gt; {</span>
 struct Bar;

 impl Foo&lt;u32&gt; for Bar {
<span class="gd">-    const B$0</span>
<span class="gi">+    const B$0;</span>
 }
 "#,
             r#"
<span class="gu">@@ -963,7 +963,7 @@ trait Foo&lt;T&gt; {</span>
 struct Bar;

 impl Foo&lt;u32&gt; for Bar {
<span class="gd">-    const BAR: u32 =</span>
<span class="gi">+    const BAR: u32 = ;</span>
 }
 "#,
         )
</code></pre></div>



<a name="243120244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120244">(Jun 18 2021 at 06:14)</a>:</h4>
<p>That worked, i pushed the changes</p>



<a name="243120309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120309">(Jun 18 2021 at 06:15)</a>:</h4>
<p>I think there were other errors on CI, but I couldn't reproduce them locally.</p>



<a name="243120316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120316">(Jun 18 2021 at 06:15)</a>:</h4>
<p>If you run into this again, try setting <code>RUN_SLOW_TESTS=1</code></p>



<a name="243120399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120399">(Jun 18 2021 at 06:17)</a>:</h4>
<p>I think you need to approve a rerun of the workflows</p>



<a name="243120408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120408">(Jun 18 2021 at 06:17)</a>:</h4>
<p>the errors in CI were just the formatting</p>



<a name="243120456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120456">(Jun 18 2021 at 06:18)</a>:</h4>
<p>Approved</p>



<a name="243120463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120463">(Jun 18 2021 at 06:18)</a>:</h4>
<p>thanks <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="243120764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243120764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243120764">(Jun 18 2021 at 06:23)</a>:</h4>
<p>CI passes <span aria-label="tada" class="emoji emoji-1f389" role="img" title="tada">:tada:</span></p>



<a name="243149245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243149245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243149245">(Jun 18 2021 at 11:48)</a>:</h4>
<p>Filed <a href="https://github.com/rust-analyzer/rust-analyzer/pull/9326">https://github.com/rust-analyzer/rust-analyzer/pull/9326</a> for the confusing error</p>



<a name="243185069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185069">(Jun 18 2021 at 16:50)</a>:</h4>
<p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span> i think you need to manually approve the bors workflow because im a first time contributor</p>



<a name="243185100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185100">(Jun 18 2021 at 16:51)</a>:</h4>
<p>kind of annoying, github didnt used to require this <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="243185102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185102">(Jun 18 2021 at 16:51)</a>:</h4>
<p>bors runs it on its own, as long the bors run works it'll merge</p>



<a name="243185120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185120">(Jun 18 2021 at 16:51)</a>:</h4>
<p>ah ok</p>



<a name="243185153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185153">(Jun 18 2021 at 16:51)</a>:</h4>
<p>Its required now because people started abusing workflows of other repos for crypto mining</p>



<a name="243185158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185158">(Jun 18 2021 at 16:51)</a>:</h4>
<p>yeah makes sense</p>



<a name="243185238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185238">(Jun 18 2021 at 16:52)</a>:</h4>
<p>Once someone approved the workflow for a contributor (or a PR, at least), it should probably work the second time</p>



<a name="243185244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185244">(Jun 18 2021 at 16:52)</a>:</h4>
<p>but it still runs it when you submit the pr, it just doesnt run it multiple times</p>



<a name="243185246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185246">(Jun 18 2021 at 16:52)</a>:</h4>
<p>But it looks like it doesn't</p>



<a name="243185253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185253">(Jun 18 2021 at 16:52)</a>:</h4>
<p>yeah</p>



<a name="243185260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185260">(Jun 18 2021 at 16:52)</a>:</h4>
<p>really weird</p>



<a name="243185272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185272">(Jun 18 2021 at 16:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="203546">Laurențiu</span> <a href="#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics/near/243185238">said</a>:</p>
<blockquote>
<p>Once someone approved the workflow for a contributor (or a PR, at least), it should probably work the second time</p>
</blockquote>
<p>you always have to reapprove after a commit unfortunately...</p>



<a name="243185743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185743">(Jun 18 2021 at 16:57)</a>:</h4>
<p>im not sure how new features in releases work, does this get added to the monday release or is there an experimental version it goes through first?</p>



<a name="243185829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185829">(Jun 18 2021 at 16:58)</a>:</h4>
<p>We do a stable release every monday, and a nightly release every day</p>



<a name="243185959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243185959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243185959">(Jun 18 2021 at 16:59)</a>:</h4>
<p>awesome</p>



<a name="243186562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/trait%20func%20completion%20does%20not%20fill%20in%20generics/near/243186562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Riccardo D&#x27;Ambrosio <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/trait.20func.20completion.20does.20not.20fill.20in.20generics.html#243186562">(Jun 18 2021 at 17:05)</a>:</h4>
<p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span> thanks for all the help btw! <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>